<?php
$this->breadcrumbs=array(
	'Table'=>array('/table'),
	'Order',
);?>
<h1>Order Table</h1>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'tables-form',
	'enableAjaxValidation'=>false,
)); ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'id'); ?>
		<?php echo $form->dropDownList($model,'id',CHtml::listData($model->findAll(),'id','name')); ?>
		<?php echo $form->error($model,'id'); ?>
	</div>
    
    <div class="row">
		<?php echo $form->labelEx($model,'table_name'); ?>
		<?php echo $form->dropDownList($model,'table_name',$tables); ?>
		<?php echo $form->error($model,'table_name'); ?>
	</div>

    <div class="row buttons">
		<?php echo CHtml::submitButton('Order'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->